<?php
/**
 *
 * @author andrew carlson <andrew@acstudiosllc.com>
 * @version 0.0.1
 * @copyright 2012 ACStudios LLC
 * @package default
 */

namespace Encompass\Accounts;
use PDO;

/**
 * Accounts View
 *
 * @package default
 * @author  andrew carlson <andrew@acstudiosllc.com>
 */
class accountsView {

	function dhtmlx_json($data) {
		foreach ($data as &$row) {
			$dhtmlxData[] = array(
				'id' => $row['user_id'], 
				'data' => array(
					$row['last_name'], 
					$row['first_name'], 
					$row['email'], 
					$row['role_name']
				), 
			);
		}

		$dhtmlResults = array(
			'total_count' => count($result), 
			'rows' => $dhtmlxData
		);
		
		echo json_encode($dhtmlResults);
	}
	
	function returnStatus($status) {
		echo $status;
	}

}
